package cn.tx.dao.impl;

import org.apache.commons.lang.StringUtils;

import cn.tx.dao.OrderDetailDao;
import cn.tx.model.OrderDetail;
import cn.tx.query.OrderDetailQuery;

public class OrderDetailDaoImpl extends BaseDaoImpl<OrderDetail, OrderDetailQuery> implements OrderDetailDao {

	@Override
	public String createHql(OrderDetailQuery q) {
		String hql = "from OrderDetail e where 1=1 ";
		String condition = this.createConditionHql(q);
		hql = hql + condition + "order by e.orderDetailId desc";
		return hql;
	}

	@Override
	public String createHqlCount(OrderDetailQuery q) {
		String hql = "select count(e) from OrderDetail e where 1=1 ";
		//StringUtils.isNotBlank判断当前的字符串是不是空串和null
		String condition = this.createConditionHql(q);
		hql = hql + condition;
		return hql;
	}

	@Override
	public String createConditionHql(OrderDetailQuery q) {
		String hql = "";
		
		
		
		return hql;
	}



}
